package com.ruoyi.ncpsy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ncpsy.mapper.NcpsyWarehouseMapper;
import com.ruoyi.ncpsy.domain.NcpsyWarehouse;
import com.ruoyi.ncpsy.service.INcpsyWarehouseService;

/**
 * 仓库信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-13
 */
@Service
public class NcpsyWarehouseServiceImpl implements INcpsyWarehouseService 
{
    @Autowired
    private NcpsyWarehouseMapper ncpsyWarehouseMapper;

    /**
     * 查询仓库信息
     * 
     * @param id 仓库信息主键
     * @return 仓库信息
     */
    @Override
    public NcpsyWarehouse selectNcpsyWarehouseById(Long id)
    {
        return ncpsyWarehouseMapper.selectNcpsyWarehouseById(id);
    }

    /**
     * 查询仓库信息列表
     * 
     * @param ncpsyWarehouse 仓库信息
     * @return 仓库信息
     */
    @Override
    public List<NcpsyWarehouse> selectNcpsyWarehouseList(NcpsyWarehouse ncpsyWarehouse)
    {
        return ncpsyWarehouseMapper.selectNcpsyWarehouseList(ncpsyWarehouse);
    }

    /**
     * 新增仓库信息
     * 
     * @param ncpsyWarehouse 仓库信息
     * @return 结果
     */
    @Override
    public int insertNcpsyWarehouse(NcpsyWarehouse ncpsyWarehouse)
    {
        return ncpsyWarehouseMapper.insertNcpsyWarehouse(ncpsyWarehouse);
    }

    /**
     * 修改仓库信息
     * 
     * @param ncpsyWarehouse 仓库信息
     * @return 结果
     */
    @Override
    public int updateNcpsyWarehouse(NcpsyWarehouse ncpsyWarehouse)
    {
        ncpsyWarehouse.setUpdateTime(DateUtils.getNowDate());
        return ncpsyWarehouseMapper.updateNcpsyWarehouse(ncpsyWarehouse);
    }

    /**
     * 批量删除仓库信息
     * 
     * @param ids 需要删除的仓库信息主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyWarehouseByIds(Long[] ids)
    {
        return ncpsyWarehouseMapper.deleteNcpsyWarehouseByIds(ids);
    }

    /**
     * 删除仓库信息信息
     * 
     * @param id 仓库信息主键
     * @return 结果
     */
    @Override
    public int deleteNcpsyWarehouseById(Long id)
    {
        return ncpsyWarehouseMapper.deleteNcpsyWarehouseById(id);
    }
}
